package jznet
import ("net")

type jzNetService struct {
    tcpService* jzTcpService
    name string
}

NewNetService(name string) *jzNetService {
    netservice := &jzNetService {
            tcpService:NewTcpService(name),
            name:name,
    }
    return netservice
}

func (netservice* jzNetSerivce) Init(port string) bool {
    if !netservice.tcpService.Bind(port) {
        return false
    }
    return true
}

func (netservice *jzNetService) Accept() (conn net.TCPConn,err error) {
    return netservice.tcpService.Accept() 
}